package com.happysmile.srm.mybatis.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name = "script")
public class Script {
    /*
     * script表主键
     * */
    @ApiModelProperty(value = "script表主键",required = false)
    @Id
    @Column
    private Long id;

    /*
     * 为该脚本提供一个描述，推荐用伪代码的形式描述
     * */
    @ApiModelProperty(value = "为该脚本提供一个描述，推荐用伪代码的形式描述",required = true)
    @Column(unique = true,nullable = false)
    private String description;

    /*
     * 脚本的内容
     * */
    @ApiModelProperty(value = "脚本的内容",required = true)
    @Column(unique = true,nullable = false)
    private String content;


    /*
     * 是否需要配置环境之类的脚本。此类脚本也存在于这张表中。
     * 默认不需要
     * */
    @ApiModelProperty(value = "是否需要配置环境之类的脚本。此类脚本也存在于这张表中。",required = true,example = "0")
    @Column(unique = true,nullable = false)
    private Boolean isMore;


    /*
     * 脚本录入时间
     * */
    @ApiModelProperty(value = "脚本录入时间",example = "2020-11-11 11:11:11")
    @Column(nullable = false)
    private Date createAt;

    /*
     * 上次修改脚本时间
     * */
    @ApiModelProperty(value = "上次修改脚本时间",example = "2020-11-11 11:11:11",required = true)
    @Column(nullable = false)
    private Date modifyAt;

    /*
     * 上次修改脚本原因
     * */
    @ApiModelProperty(value = "上次修改脚本原因",example = "增加",required = true)
    @Column(nullable = false)
    private String modify_reason;

}